// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_DELIVERY_ORDER
// * CreateDate    : 2011/8/16 10:16:41
// * Creater       : CodeSmith
// * LastChangeDate: 2011/8/16 10:16:41
// * LastChanger   : 2011/8/16 10:16:41
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class SalesDeliveryOrderEntity : EntityBase
    {
        public SalesDeliveryOrderTable TableSchema
        {
            get
            {
                return SalesDeliveryOrderTable.Current;
            }
		}
		
		public SalesDeliveryOrderEntity()
        {

        }
		
		public SalesDeliveryOrderEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.DeliveryOrderId = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_ORDER_ID"]));
			this.DeliveryOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_ORDER_CODE"]));
			this.DeliveryType = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_TYPE"]));
			this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.DeliveryPerson = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PERSON"]));
			this.TransportType = Convert.ToString(CommonFunctions.ToObject(dr["TRANSPORT_TYPE"]));
			this.ReceivedPerson = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PERSON"]));
			this.ReceivedPersonPhone = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PERSON_PHONE"]));
			this.DeliveryPlace = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PLACE"]));
			this.DeliveryPlaceZipcode = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PLACE_ZIPCODE"]));
			this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.IsBilled = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_BILLED"]));
            this.IsAmountReceived = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_AMOUNT_RECEIVED"]));
        }
		
		public SalesDeliveryOrderEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.DeliveryOrderId = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_ORDER_ID"]));
			this.DeliveryOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_ORDER_CODE"]));
			this.DeliveryType = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_TYPE"]));
			this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.DeliveryPerson = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PERSON"]));
			this.TransportType = Convert.ToString(CommonFunctions.ToObject(dr["TRANSPORT_TYPE"]));
			this.ReceivedPerson = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PERSON"]));
			this.ReceivedPersonPhone = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PERSON_PHONE"]));
			this.DeliveryPlace = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PLACE"]));
			this.DeliveryPlaceZipcode = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PLACE_ZIPCODE"]));
			this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.IsBilled = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_BILLED"]));
            this.IsAmountReceived = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_AMOUNT_RECEIVED"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesDeliveryOrderTable.Current;
            }
        }
		
		#region Perporty List
        public string DeliveryOrderId
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_DELIVERY_ORDER_ID)); }
            set { SetData(SalesDeliveryOrderTable.C_DELIVERY_ORDER_ID, value); }
        }
		
        public string DeliveryOrderCode
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_DELIVERY_ORDER_CODE)); }
            set { SetData(SalesDeliveryOrderTable.C_DELIVERY_ORDER_CODE, value); }
        }
		
        public string DeliveryType
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_DELIVERY_TYPE)); }
            set { SetData(SalesDeliveryOrderTable.C_DELIVERY_TYPE, value); }
        }
		
        public DateTime DeliveryDate
        {
            get { return Convert.ToDateTime(GetData(SalesDeliveryOrderTable.C_DELIVERY_DATE)); }
            set { SetData(SalesDeliveryOrderTable.C_DELIVERY_DATE, value); }
        }
		
        public string CustomerId
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_CUSTOMER_ID)); }
            set { SetData(SalesDeliveryOrderTable.C_CUSTOMER_ID, value); }
        }
		
        public string DeliveryPerson
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_DELIVERY_PERSON)); }
            set { SetData(SalesDeliveryOrderTable.C_DELIVERY_PERSON, value); }
        }
		
        public string TransportType
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_TRANSPORT_TYPE)); }
            set { SetData(SalesDeliveryOrderTable.C_TRANSPORT_TYPE, value); }
        }
		
        public string ReceivedPerson
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_RECEIVED_PERSON)); }
            set { SetData(SalesDeliveryOrderTable.C_RECEIVED_PERSON, value); }
        }
		
        public string ReceivedPersonPhone
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_RECEIVED_PERSON_PHONE)); }
            set { SetData(SalesDeliveryOrderTable.C_RECEIVED_PERSON_PHONE, value); }
        }
		
        public string DeliveryPlace
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_DELIVERY_PLACE)); }
            set { SetData(SalesDeliveryOrderTable.C_DELIVERY_PLACE, value); }
        }
		
        public string DeliveryPlaceZipcode
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_DELIVERY_PLACE_ZIPCODE)); }
            set { SetData(SalesDeliveryOrderTable.C_DELIVERY_PLACE_ZIPCODE, value); }
        }
		
        public string WarehouseCode
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_WAREHOUSE_CODE)); }
            set { SetData(SalesDeliveryOrderTable.C_WAREHOUSE_CODE, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_REMARK)); }
            set { SetData(SalesDeliveryOrderTable.C_REMARK, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(SalesDeliveryOrderTable.C_CREATED_DATE)); }
            set { SetData(SalesDeliveryOrderTable.C_CREATED_DATE, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_CREATED_BY)); }
            set { SetData(SalesDeliveryOrderTable.C_CREATED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(SalesDeliveryOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(SalesDeliveryOrderTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(SalesDeliveryOrderTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(SalesDeliveryOrderTable.C_APPROVED_DATE)); }
            set { SetData(SalesDeliveryOrderTable.C_APPROVED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_APPROVED_BY)); }
            set { SetData(SalesDeliveryOrderTable.C_APPROVED_BY, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(SalesDeliveryOrderTable.C_STATUS)); }
            set { SetData(SalesDeliveryOrderTable.C_STATUS, value); }
        }

        public int IsBilled
        {
            get { return Convert.ToInt32(GetData(SalesDeliveryOrderTable.C_IS_BILLED)); }
            set { SetData(SalesDeliveryOrderTable.C_IS_BILLED, value); }
        }

        public int IsAmountReceived
        {
            get { return Convert.ToInt32(GetData(SalesDeliveryOrderTable.C_IS_AMOUNT_RECEIVED)); }
            set { SetData(SalesDeliveryOrderTable.C_IS_AMOUNT_RECEIVED, value); }
        }
		
		#endregion
	}
	
	
}	

